package com.kexinde.wjifen.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.kexinde.wjifen.model.Gift;

@Component("giftDao")
public class GiftDao extends BaseDao<Gift> {

	@SuppressWarnings("unchecked")
	public Gift findById(long giftId) {
		List<Gift> gifts = hibernateTemplate.find("form Gift g where g.id="
				+ giftId);
		if (null == gifts || 0 == gifts.size()) {
			return null;
		}
		return gifts.get(0);
	}

}
